/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package resumen;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

/**
 *
 * @author sergio
 */
public class Clase {
    
    ArrayList<String> num;
    ArrayList<String> type;
    ArrayList<String> fourStore;
    ArrayList<String> allegro;
    ArrayList<String> bigdata;
    ArrayList<String> dex;
    ArrayList<String> neoFourJ;
    ArrayList<String> pgSQL;
    ArrayList<String> virtuoso;

    public Clase() throws FileNotFoundException, IOException {
        
        this.num = new ArrayList<String>();
        this.type = new ArrayList<String>();
        this.fourStore = new ArrayList<String>();
        this.allegro = new ArrayList<String>();
        this.bigdata = new ArrayList<String>();
        this.dex = new ArrayList<String>();
        this.neoFourJ = new ArrayList<String>();
        this.pgSQL = new ArrayList<String>();
        this.virtuoso = new ArrayList<String>();
        
        File archivo = new File ("resumen0");
        FileReader fr = new FileReader (archivo);
        BufferedReader br = new BufferedReader(fr);
        String linea;
        while((linea=br.readLine())!=null){
            String[] elementos = linea.split(" ");
//            System.out.println(elementos);
            num.add(elementos[0]);
            type.add(elementos[1]);
            fourStore.add(elementos[2]);
            allegro.add(elementos[3]);
            bigdata.add(elementos[4]);
            dex.add(elementos[5]);
            neoFourJ.add(elementos[6]);
            pgSQL.add(elementos[7]);
            virtuoso.add(elementos[8]);
        }
        //System.out.println("BUSCAR");
        this.buscarReslutadosDsitintos();
    }

    private void buscarReslutadosDsitintos() {
        int i = 0;
        while(i<num.size()){
//            System.out.println("Buscar consulta tipo: "+type.get(i)+": nro: "+num.get(i));
            if(!(fourStore.get(i).equals(allegro.get(i))) || 
               !(allegro.get(i).equals(bigdata.get(i))) ||
               !(bigdata.get(i).equals(dex.get(i))) ||
               !(dex.get(i).equals(neoFourJ.get(i))) ||
               !(neoFourJ.get(i).equals(pgSQL.get(i))) ||
               !(pgSQL.get(i).equals(virtuoso.get(i)))){
                System.out.println("Resultado Distinto en cosulta "+type.get(i)+": nro: "+num.get(i));
            }
            i++;
        }
    }
    
}
